<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="d" uri="http://dgg.net/jsp/jstl/core" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>



    <p  id="timeout" name="timeout" hidden data-timeout="${TIME_OUT}" ></p>
    <div class="dgg-list-top-warp">
        <div class="screen-search">
            <ul>
                <li>
                    <label>客户姓名：</label>
                    <input type="text" class="dggui-input dggui-input-normal" id="customerName" name="customerName" placeholder="输入客户姓名" maxlength="50">
                </li>
                <li>
                    <label>所属生产事业部：</label>
                    <select id="productOrgId" name="productOrgId" >
                    </select>
                </li>
          <%--      <li>
                    <label>订单状态：</label>
                    <select name="orderStatus" id="orderStatus" style="min-width: 80px; display: none;">
                    </select>
                </li>--%>
               <%-- <li>
                    <label>业务类型：</label>
                    <div name="typeCode" id="typeCode"></div>
                </li>
                <li>
                    <label>产品：</label>
                    <select name="productCode" id="productCode" style="min-width: 80px; display: none;">
                    </select>
                </li>
                <li>
                    <label>渠道：</label>
                    <select name="channelCode" id="channelCode" class="dggui-select">
                        <option value=''>请选择</option>
                    </select>
                </li>
                <li>
                    <label>节点：</label>
                    <select name="nodeId" id="nodeId" class="dggui-select">
                        <option value=''>请选择</option>
                    </select>
                </li>--%>
                <li>
                    <label>流程人员：</label>
                    <select id="flowUserId" name="flowUserId"  style="min-width: 80px; display: none;">
                    </select>
                </li>
                <li>
                    <label>签单商务：</label>
                    <select  id="signUserId" name="signUserId">
                    </select>
                </li>
                <li>
                    <label>签单部门：</label>
                    <div class="tree-select-warp">
                        <input type="text" class="dggui-input input-selct-tree" id="signOrg" name="signOrg" data-id="" value=""  style="width: 320px"/>
                    </div>
                </li>


              <%--  <li>
                    <label>签单时间：</label>
                    <input type="text" readonly class="dggui-input dggui-time-range" id="signTime" name="signTime">
                    <i class="iconfont icon-rili"></i>
                </li>--%>
                <li>
                    <label>接单时间：</label>
                    <input type="text" readonly class="dggui-input dggui-time-range" id="receiveOrderDate" name="receiveOrderDate">
                    <i class="iconfont icon-rili"></i>
                </li>
                <li>
               <%--     <label>分配时间：</label>
                    <input type="text" readonly class="dggui-input dggui-time-range" id="allotDate" name="allotDate">
                    <i class="iconfont icon-rili"></i>
                </li>--%>
                <li>
                    <label>暂缓时间：</label>
                    <input type="text" readonly class="dggui-input dggui-time-range" id="suspendTime" name="suspendTime">
                    <i class="iconfont icon-rili"></i>
                </li>
                <li>
                    <label>关键字：</label>
                    <input type="text" class="dggui-input dggui-input-large" id="searchKey" name="searchKey" placeholder="客户名/订单编号/生产订单编号" maxlength="50" style="width: 190px;">
                </li>
              <%--  <li>
                    <label>需求金额：</label>
                    <input type="number" class="dggui-input dggui-input-large" id="moneyMin" name="moneyMin" placeholder="输入最小金额" min="0">~
                    <input type="number" class="dggui-input dggui-input-large" id="moneyMax" name="moneyMax" placeholder="输入最大金额" min="0">
                </li>--%>
                <li>
                    <button class="dggui-btn searchBtn" >搜索</button>
                    <button class="dggui-btn dggui-btn-primary"  onclick="cleanSearch()">清空条件</button>
                    <d:hasUrlAuth authCode="RZSC_OPERATION_EXPORT">
                    <button class="dggui-btn dggui-btn-green" onclick="excelExportWaitReceive()">导出</button>
                    </d:hasUrlAuth>
                </li>
            </ul>
        </div>
    </div>
    <div class="list-content">
        <div class="tool-bar">
            <div class="fl"  id="waitAcdept">
                <d:hasUrlAuth authCode="RZSC_OPERATION_CALL">
                <a href="javascript:void(0)"class="dggui-btn" onclick="callPhoneByProduction($('#defedOrder'))">打电话</a>
                </d:hasUrlAuth>
                <%--<a href="javascript:void(0)"class="dggui-btn">更换渠道</a>--%>
                <d:hasUrlAuth authCode="RZSC_OPERATION_START">
                <a href="javascript:void(0)" class="dggui-btn" onclick="hintLayerzh('#defedOrder')">恢复办理</a>
                </d:hasUrlAuth>
           <%--     <a href="javascript:void(0)"class="dggui-btn"  onclick="abandon($('#defedOrder'))">退单</a>
                <a href="javascript:void(0)"class="dggui-btn"  onclick="nullify($('#defedOrder'))">废单</a>
                <a href="javascript:void(0)"class="dggui-btn" onclick="transfer()">转单</a>--%>
                <%--<a href="javascript:void(0)"class="dggui-btn">转单</a>--%>
            </div>
            <div class="fr node-state" >
                <ul>
                    <li class="over-finish">订单超期</li>
                    <li>节点超期</li>
                    <li class="over">接收超期</li>
                </ul>
            </div>
        </div>
        <div class="table-warp">
            <table class="dggui-table" id="defedOrder">
            </table>
        </div>
    </div>


<script>


    /**
     * 转单
     */
    function transfer(){
        var checkDate = $('#defedOrder').dataTableExtend('getCheck');
        if(checkDate.length < 1){
            dggui.dialog.errors('未勾选订单！');
            return;
        }
        var ids = [];
        for(var i=0;i<checkDate.length;i++){
            ids.push(checkDate[i].id);
        }
        ids = ids.join(",");
        transferOrder(ids,$('#defedOrder'));
    }
</script>
